/**
 * 播放视频弹窗
 */
import React from 'react';
import { connect } from 'react-redux'
import {Modal, Button,message,Carousel,Icon} from 'antd'
import '../style/showBigImg.less'
@connect(
    (state, props) => ({})
  )
class ShowVideo extends React.Component {
  constructor(props){
    super(props);
    this.state={
    }
  }
  componentWillReceiveProps(props){//在组件接收到一个新的 prop (更新后)时被调用。这个方法在初始化render时不会被调用。
  }
  componentDidMount(){
  }
  componentWillMount() {
  }
  handleCancel = (e) => {
    this.props.closeModal();
  }

  render(){
    return (
        <div>
            <Modal
                width={550}
                title={"播放视频"}
                visible={this.props.visible}
                maskClosable={false}
                onCancel={this.handleCancel}
                footer={[
                    <Button key="ok" type="primary"  onClick={this.handleCancel.bind(this)}>关闭</Button>
                ]}
                >
                <div className="bigImgWrap" style={{display:'flex',justifyContent:"center",alignItems:'center'}}>               
                    <video style={{width:'100%',maxHeight:'100%'}} poster={this.props.videoData.imageAddr[0]||''} controls src={this.props.videoData.videoPath}></video>
                </div>
            </Modal>
        </div>
    )
  }
}
export default ShowVideo;